<!DOCTYPE html>
<html>

<head>
    <title>Water Treatment</title>
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="custom/images/favicon.ico?v=2" />
    <style>
        html,
        body {
            padding: 0px;
            margin: 0px;
        }

    </style>

        <script src='custom/configs/htconfig.js'></script>
        <script src='libs/ht.js'></script>
    <!-- <script src='client/libs/ht-edgetype.js'></script> -->
    <script>
            !function(){"use strict";function t(t){var e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375}function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function n(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}function r(t){return"[object Array]"===U.call(t)}function i(t){return null!==t&&"object"==typeof t}function o(t){return"[object Function]"===U.call(t)}function a(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||r(t)||(t=[t]),r(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}function s(){for(var t={},e=0,n=arguments.length;e<n;e++)a(arguments[e],function(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=s(t[n],e):t[n]=e});return t}function u(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function c(){this.message="String contains an invalid character"}function f(t,e){!N.isUndefined(t)&&N.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function d(){this.handlers=[]}function l(t){t.cancelToken&&t.cancelToken.throwIfRequested()}function h(t){this.defaults=t,this.interceptors={request:new et,response:new et}}function p(t){this.message=t}function m(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new ut(t),e(n.reason))})}function v(t){var e=new st(t),n=F(st.prototype.request,e);return N.extend(n,st.prototype,e),N.extend(n,e),n}var y=Math.pow,g=Math.sqrt,w=Math.sin,b=Math.cos,D=Math.PI,C=1.70158,S=1.525*C,A=2*D/3,E=2*D/4.5,L={swing:function(t){return-b(t*D)/2+.5},linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 1-(1-t)*(1-t)},easeInOutQuad:function(t){return t<.5?2*t*t:1-y(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-y(1-t,3)},easeInOutCubic:function(t){return t<.5?4*t*t*t:1-y(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-y(1-t,4)},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-y(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-y(1-t,5)},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1-y(-2*t+2,5)/2},easeInSine:function(t){return 1-b(t*D/2)},easeOutSine:function(t){return w(t*D/2)},easeInOutSine:function(t){return-(b(D*t)-1)/2},easeInExpo:function(t){return 0===t?0:y(2,10*t-10)},easeOutExpo:function(t){return 1===t?1:1-y(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:t<.5?y(2,20*t-10)/2:(2-y(2,-20*t+10))/2},easeInCirc:function(t){return 1-g(1-y(t,2))},easeOutCirc:function(t){return g(1-y(t-1,2))},easeInOutCirc:function(t){return t<.5?(1-g(1-y(2*t,2)))/2:(g(1-y(-2*t+2,2))+1)/2},easeInElastic:function(t){return 0===t?0:1===t?1:-y(2,10*t-10)*w((10*t-10.75)*A)},easeOutElastic:function(t){return 0===t?0:1===t?1:y(2,-10*t)*w((10*t-.75)*A)+1},easeInOutElastic:function(t){return 0===t?0:1===t?1:t<.5?-y(2,20*t-10)*w((20*t-11.125)*E)/2:y(2,-20*t+10)*w((20*t-11.125)*E)/2+1},easeInBack:function(t){return 2.70158*t*t*t-C*t*t},easeOutBack:function(t){return 1+2.70158*y(t-1,3)+C*y(t-1,2)},easeInOutBack:function(t){return t<.5?y(2*t,2)*(7.189819*t-S)/2:(y(2*t-2,2)*((S+1)*(2*t-2)+S)+2)/2},easeInBounce:function(e){return 1-t(1-e)},easeOutBounce:t,easeInOutBounce:function(e){return e<.5?(1-t(1-2*e))/2:(1+t(2*e-1))/2}},k=window.ht;k.Data.prototype.initCustomAnim=function(){function t(a){o=k.Default.startAnim({duration:n,easing:L[i],finishFunc:function(){r&&(a=!a),t(a)},action:function(t,n){a&&(t=1-t),s(t,e)}})}if(this.a("animat.custom.used")){var e=this,n=this.a("animat.custom.duration"),r=this.a("animat.custom.autoReverse");n||(n=1e3);var i=this.a("animat.custom.easing");i||(i="linear");var o,a=e.a("animat.custom.onUpdate"),s=new Function("value","data",a);this.addAttrChangeListener("animat.custom.running",function(e,n){void 0===n&&(n=!0),o?n?o.resume():o.pause():n&&t()})}};var x=window.ht;x.Data.prototype.initRotationAnim=function(){function t(a){o=x.Default.startAnim({duration:n,easing:function(t){return t},finishFunc:function(){i&&(a=!a),t(a)},action:function(t,n){a&&(t=1-t),e.setRotation(2*Math.PI*t*r)}})}if(this.a("animat.rotation.used")){var e=this,n=this.a("animat.rotation.duration"),r=this.a("animat.rotation.direction")?1:-1,i=this.a("animat.rotation.autoReverse");n||(n=1e3);var o;this.addAttrChangeListener("animat.rotation.running",function(e,n){void 0===n&&(n=!0),o?n?o.resume():o.pause():n&&t()})}};var O=window.ht;O.Data.prototype.initBlinkAnim=function(){function t(){i=O.Default.startAnim({duration:n,easing:L[r],finishFunc:function(){if(e.a("animat.blink.running"))t();else{var n=e.getDataBindings();if(n&&n.s&&n.s["2d.visible"]){var r=n.s["2d.visible"].id;if(r){var i=e.dm().vm()[r];if(i)return void e.s("2d.visible",i)}}e.s("2d.visible",o)}},action:function(t,n){e.s("2d.visible",t<.5)}})}if(this.a("animat.blink.used")){var e=this,n=this.a("animat.blink.duration");n||(n=1e3);var r=this.a("animat.blink.easing");r||(r="linear");var i,o=this.s("2d.visible");this.addAttrChangeListener("animat.blink.running",function(e,n){void 0===n&&(n=!0),n?i&&i.isRunning()||t():i&&i.stop(!0)})}};var R=window.ht;R.Data.prototype.initScaleAnim=function(){function t(u){s=R.Default.startAnim({duration:n,easing:L[r],finishFunc:function(){i&&(u=!u),t(u)},action:function(t,n){u&&(t=1-t);var r=o>=1?1+(o-1)*t:o+t*(1-o),i=a>=1?1+(a-1)*t:a+t*(1-a);e.setScale({x:r,y:i})}})}if(this.a("animat.scale.used")){var e=this,n=this.a("animat.scale.duration");n||(n=1e3);var r=this.a("animat.scale.easing");r||(r="linear");var i=this.a("animat.scale.autoReverse"),o=e.a("animat.scale.x"),a=e.a("animat.scale.y");o||(o=1),a||(a=1);var s;this.addAttrChangeListener("animat.scale.running",function(e,n){void 0===n&&(n=!0),s?n?s.resume():s.pause():n&&t()})}};var T=window.ht;T.Data.prototype.initTranslateAnim=function(){function t(c){s=T.Default.startAnim({duration:n,easing:L[r],finishFunc:function(){i&&(c=!c),t(c)},action:function(t,n){c&&(t=1-t),e.setPosition(u.x+t*o,u.y+t*a)}})}if(this.a("animat.translate.used")){var e=this,n=this.a("animat.translate.duration");n||(n=1e3);var r=this.a("animat.translate.easing");r||(r="linear");var i=e.a("animat.translate.autoReverse"),o=e.a("animat.translate.x"),a=e.a("animat.translate.y");void 0===i&&(i=!0);var s,u=e.getPosition();this.addAttrChangeListener("animat.translate.running",function(e,n){void 0===n&&(n=!0),s?n?s.resume():s.pause():n&&t()})}},function(){function t(t){t.initCustomAnim(),t.initBlinkAnim(),t.initRotationAnim(),t.initScaleAnim(),t.initTranslateAnim()}var e=window.ht;e.Data.prototype.addAttrChangeListener=function(t,e){this.attrListeners||(this.attrListeners={}),this.attrListeners[t]||(this.attrListeners[t]=[]),this.attrListeners[t].push(e),e.call(this,void 0,this.a("name"))},e.Data.prototype.addStyleChangeListener=function(t,e){this.styleListeners||(this.styleListeners={}),this.styleListeners[t]||(this.styleListeners[t]=[]),this.styleListeners[t].push(e),e.call(this,void 0,this.s("name"))},e.Data.prototype.addPropertyChangeListener=function(t,e){this.propertyListeners||(this.propertyListeners={}),this.propertyListeners[t]||(this.propertyListeners[t]=[]),this.propertyListeners[t].push(e),e.call(this,void 0,this[t])},e.DataModel.prototype.onDataPropertyChanged=function(t,e){var n=e.property,r=e.oldValue,i=e.newValue;if(0===n.indexOf("a:")){if(t.attrListeners){var o=t.attrListeners[n.substring(2)];o&&o.forEach(function(e){e.call(t,r,i)})}}else if(0===n.indexOf("s:")){if(t.styleListeners){var a=t.styleListeners[n.substring(2)];a&&a.forEach(function(e){e.call(t,r,i)})}}else if(t.propertyListeners){var s=t.propertyListeners[n.substring(2)];s&&s.forEach(function(e){e.call(t,r,i)})}},e.DataModel.prototype.enableAnimat=function(){var e=this;e.addDataModelChangeListener(function(e){"add"===e.kind&&t(e.data)}),e.each(function(e){t(e)})}}(),function(){function t(t,e,r){if(!t.hasOwnProperty(e)){var i=new n;Object.defineProperty(t,e,{get:function(){return n.target&&i.addSub(n.target),r},set:function(t){t!==r&&(r=t,i.notify())}})}}function e(t,e,r,i,o,a){n.target=this,this.name=e,this.data=r,this.vm=t,this.bindType=i,this.bindName=o,this.bindFunc=a,this.update(),n.target=null}function n(){this.subs=[]}function r(n,r){var i,o,a=r.getDataBindings();if(a){for(i in a.a)t(n,(o=a.a[i]).id),new e(n,o.id,r,"attr",i,o.func);for(i in a.s)t(n,(o=a.s[i]).id,null),new e(n,o.id,r,"style",i,o.func);for(i in a.p)t(n,(o=a.p[i]).id,null),new e(n,o.id,r,"property",i,o.func)}}var i=window.ht;e.prototype={update:function(){this.get();var t=this.value;this.bindFunc&&(t=this.bindFunc(t)),void 0!==t&&("attr"===this.bindType?this.data.a(this.bindName,t):"style"===this.bindType?this.data.s(this.bindName,t):this.data[i.Default.setter(this.bindName)](t))},get:function(){this.value=this.vm[this.name]}},n.prototype={addSub:function(t){this.subs.push(t)},notify:function(){this.subs.forEach(function(t){t.update()})}},i.DataModel.prototype.vm=function(){return this._vm||(this._vm={}),this._vm},i.DataModel.prototype.enableDataBindings=function(){this.addDataModelChangeListener(function(t){"add"===t.kind&&r(t.data.dm().vm(),t.data)}),this.each(function(t){r(t.dm().vm(),t)})}}(),function(){function t(t,e,n){return o.Default.isArray(t)||(t=[t.x,t.y,t.width,t.height]),n||(n=e),{x:t[0]*e,y:t[1]*n,width:t[2]*e,height:t[3]*n}}function e(t,n,r){if(n.target&&(n=t.lp(n)),r||(r=t.getDataAt(n)),r instanceof o.Data)for(var i,a,s=r.getChildren(),u=0;u<s.size();u++)if((i=s.get(u))instanceof o.Node||i instanceof o.Block){var c=i.getWidth(),f=i.getHeight(),d=i.getPosition(),l={x:d.x-.5*c,y:d.y-.5*f,width:c,height:f};if(o.Default.containsPoint(l,n))return i}else if(i.s("editor.folder")&&null!=(a=e(t,n,i)))return a;return null}function n(e,n,r){if(n.target&&(n=e.lp(n)),r||(r=e.getDataAt(n)),!r)return null;var i=r.getImage();if(!i)return null;var a=o.Default.getImage(i);if(!a||!a.comps)return null;var s=r.getWidth(),u=r.getHeight(),c=r.getPosition(),f=c.x-.5*s,d=c.y-.5*u,l=a.width,h=a.height;o.Default.isNumber(l)||(l=l.func(r,e)),o.Default.isNumber(h)||(h=h.func(r,e));var p=f,m=d,v=r.s("image.stretch"),y=s/l,g=u/h;"centerUniform"===v&&(s>l&&u>h?(p=c.x-.5*l,m=c.y-.5*h,y=1,g=1):v="uniform"),"uniform"===v&&(y>g?p=c.x-g*l/2:y<g&&(m=c.y-y*h/2),g=y=Math.min(y,g));for(var w,b,D={x:n.x-p,y:n.y-m},C=a.comps,S=0,A=C.length;S<A;S++)if(w=C[S],b=w.rect){if(o.Default.isFunction(b.func)){var E=b.func(r,e);b=E||b.value}if(b){if(b=t(b,y,g),o.Default.containsPoint(b,D))break;w=null}}return w||null}function r(t,e,n,r,i){new Function("e","data","comp","graphView",e)(t,r,i,n)}function i(t,a,s,u){if(null!==s){t.preventDefault(),"mousemove"!==a||s._mouseover||(s._mouseover=!0,i(t,"mouseover",s,u)),"mouseout"===a&&(s._mouseover=!1);var c,f="event."+a;if((c=s.a(f))&&r(t,c,u,s),s instanceof o.Block){if("mouseout"===a)s.eachChild(function(e){(e._mouseover||e.s("editor.folder"))&&i(t,a,e,u)});else if("mouseover"!==a){var d=e(u,t,s);d&&i(t,a,d,u)}}else if(s instanceof o.Node){var l=o.Default.getImage(s.getImage());if(l){(c=l[f])&&r(t,c,u,s);var h,p,m,v=l.comps;if("mouseout"===a)for(p=0,m=v.length;p<m;p++)(h=v[p])._mouseover&&(h._mouseover=!1,(c=h[f])&&r(t,c,u,s,h));else if("mousemove"===a){var y=n(u,t,s);for(null!==y&&(y._mouseover||(c=y["event.mouseover"],y._mouseover=!0,c&&r(t,c,u,s,y))),p=0,m=v.length;p<m;p++)(h=v[p])!==y&&(h._mouseover=!1,(c=h["event.mouseout"])&&r(t,c,u,s,h))}else"mouseover"!==a&&null!==(h=n(u,t,s))&&(c=h[f])&&r(t,c,u,s,h)}}else s.s("editor.folder")&&"mouseout"===a&&s.eachChild(function(e){(e._mouseover||e.s("editor.folder"))&&i(t,a,e,u)})}}var o=window.ht;o.graph.GraphView.prototype.enableEvent=function(){var t=this,e=t.dm(),n=t.getView();n.addEventListener("click",function(e){var n=t.getDataAt(e);n&&i(e,"click",n,t)}),n.addEventListener("dblclick",function(e){var n=t.getDataAt(e);n&&i(e,"dblclick",n,t)}),n.addEventListener("mouseup",function(e){var n=t.getDataAt(e);n&&i(e,"mouseup",n,t)}),n.addEventListener("mousedown",function(e){var n=t.getDataAt(e);n&&i(e,"mousedown",n,t)}),n.addEventListener("mousemove",function(n){var r=t.getDataAt(n);r&&i(n,"mousemove",r,t),e.getRoots().each(function(e){null!==r&&e===r||(e._mouseover?i(n,"mouseout",e,t):e.s("editor.folder")&&e.eachChild(function(o){o!==r&&i(n,"mouseout",e,t)}))})})}}();!function(){function t(t){this.value=t}function e(e){function n(i,o){try{var a=e[i](o),s=a.value;s instanceof t?Promise.resolve(s.value).then(function(t){n("next",t)},function(t){n("throw",t)}):r(a.done?"return":"normal",a.value)}catch(t){r("throw",t)}}function r(t,e){switch(t){case"return":i.resolve({value:e,done:!0});break;case"throw":i.reject(e);break;default:i.resolve({value:e,done:!1})}(i=i.next)?n(i.key,i.arg):o=null}var i,o;this._invoke=function(t,e){return new Promise(function(r,a){var s={key:t,arg:e,resolve:r,reject:a,next:null};o?o=o.next=s:(i=o=s,n(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}();var I=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},M=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),_=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},P=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},B=function t(e){I(this,t),this.dataModel=e,this.dataSourceType=e.a("datasource.type"),this.dataSourceUrl=e.a("datasource.url");var n=e.a("datasource.func");n&&""!==n||(n="\n                for (let deviceId in resp) {\n                    let deviceData = resp[deviceId]\n                    for (let key in deviceData) {\n                        dataModel.vm()[deviceId+'.'+key] = deviceData[key]\n                    }\n\n                    let htData = dataModel.getDataByTag(deviceId)\n                    if (htData) {\n                        htData.a(deviceData)\n                    }\n                }\n            "),this.handleJsonData=new Function("dataModel","resp",n)},j=function(t){function e(t){I(this,e);var n=P(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));if(!n.dataSourceUrl||""===n.dataSourceUrl)return P(n);var r=t.a("datasource.hub");if(!r||""===r)return P(n);var i=t.a("datasource.topic");return i&&""!==i?(n.connection=jQuery.hubConnection(n.dataSourceUrl),n.hubProxy=n.connection.createHubProxy(r),n.hubProxy.on(i,function(t){n.handleJsonData(n.dataModel,t)}),n.isConnected=!1,n.connection.stateChanged(function(t){n.isConnected=t.newState===jQuery.signalR.connectionState.connected,t.newState===jQuery.signalR.connectionState.disconnected&&n.onDisconnected()}),n.connect(),n):P(n)}return _(e,B),M(e,[{key:"connect",value:function(){var t=this;this.connection.start().done(function(){t.onConnected()}).fail(function(){setTimeout(function(){t.connect()},2e3)})}},{key:"onConnected",value:function(){var t=this.dataModel.a("datasource.onConnected");t&&""!==t&&new Function("dataModel","datasource",t)(this.dataModel,this)}},{key:"onDisconnected",value:function(){var t=this;setTimeout(function(){t.connect()},2e3);var e=this.dataModel.a("datasource.onDisconnected");e&&""!==e&&new Function("dataModel","datasource",e)(this.dataModel,this)}}]),e}(),F=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},U=Object.prototype.toString,N={isArray:r,isArrayBuffer:function(t){return"[object ArrayBuffer]"===U.call(t)},isBuffer:function(t){return null!=t&&(e(t)||n(t)||!!t._isBuffer)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:i,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===U.call(t)},isFile:function(t){return"[object File]"===U.call(t)},isBlob:function(t){return"[object Blob]"===U.call(t)},isFunction:o,isStream:function(t){return i(t)&&o(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:a,merge:s,extend:function(t,e,n){return a(e,function(e,r){t[r]=n&&"function"==typeof e?F(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},q=function(t,e){N.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})},Q=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t},H=function(t,e,n,r,i){var o=new Error(t);return Q(o,e,n,r,i)},V=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(H("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)},J=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(N.isURLSearchParams(e))r=e.toString();else{var i=[];N.forEach(e,function(t,e){null!==t&&void 0!==t&&(N.isArray(t)&&(e+="[]"),N.isArray(t)||(t=[t]),N.forEach(t,function(t){N.isDate(t)?t=t.toISOString():N.isObject(t)&&(t=JSON.stringify(t)),i.push(u(e)+"="+u(t))}))}),r=i.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t},z=function(t){var e,n,r,i={};return t?(N.forEach(t.split("\n"),function(t){r=t.indexOf(":"),e=N.trim(t.substr(0,r)).toLowerCase(),n=N.trim(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i},X=N.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(r.setAttribute("href",e),e=r.href),r.setAttribute("href",e),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");return e=t(window.location.href),function(n){var r=N.isString(n)?t(n):n;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.prototype=new Error,c.prototype.code=5,c.prototype.name="InvalidCharacterError";var $=N.isStandardBrowserEnv()?{write:function(t,e,n,r,i,o){var a=[];a.push(t+"="+encodeURIComponent(e)),N.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),N.isString(r)&&a.push("path="+r),N.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},G="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||function(t){for(var e,n,r=String(t),i="",o=0,a=W;r.charAt(0|o)||(a="=",o%1);i+=a.charAt(63&e>>8-o%1*8)){if((n=r.charCodeAt(o+=.75))>255)throw new c;e=e<<8|n}return i},K=function(t){return new Promise(function(e,n){var r=t.data,i=t.headers;N.isFormData(r)&&delete i["Content-Type"];var o=new XMLHttpRequest,a="onreadystatechange",s=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in o||X(t.url)||(o=new window.XDomainRequest,a="onload",s=!0,o.onprogress=function(){},o.ontimeout=function(){}),t.auth){var u=t.auth.username||"",c=t.auth.password||"";i.Authorization="Basic "+G(u+":"+c)}if(o.open(t.method.toUpperCase(),J(t.url,t.params,t.paramsSerializer),!0),o.timeout=t.timeout,o[a]=function(){if(o&&(4===o.readyState||s)&&(0!==o.status||o.responseURL&&0===o.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in o?z(o.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?o.response:o.responseText,status:1223===o.status?204:o.status,statusText:1223===o.status?"No Content":o.statusText,headers:r,config:t,request:o};V(e,n,i),o=null}},o.onerror=function(){n(H("Network Error",t,null,o)),o=null},o.ontimeout=function(){n(H("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",o)),o=null},N.isStandardBrowserEnv()){var f=$,d=(t.withCredentials||X(t.url))&&t.xsrfCookieName?f.read(t.xsrfCookieName):void 0;d&&(i[t.xsrfHeaderName]=d)}if("setRequestHeader"in o&&N.forEach(i,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete i[e]:o.setRequestHeader(e,t)}),t.withCredentials&&(o.withCredentials=!0),t.responseType)try{o.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&o.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){o&&(o.abort(),n(t),o=null)}),void 0===r&&(r=null),o.send(r)})},Y={"Content-Type":"application/x-www-form-urlencoded"},Z={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=K:"undefined"!=typeof process&&(t=K),t}(),transformRequest:[function(t,e){return q(e,"Content-Type"),N.isFormData(t)||N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)?t:N.isArrayBufferView(t)?t.buffer:N.isURLSearchParams(t)?(f(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):N.isObject(t)?(f(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};Z.headers={common:{Accept:"application/json, text/plain, */*"}},N.forEach(["delete","get","head"],function(t){Z.headers[t]={}}),N.forEach(["post","put","patch"],function(t){Z.headers[t]=N.merge(Y)});var tt=Z;d.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},d.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},d.prototype.forEach=function(t){N.forEach(this.handlers,function(e){null!==e&&t(e)})};var et=d,nt=function(t,e,n){return N.forEach(n,function(n){t=n(t,e)}),t},rt=function(t){return!(!t||!t.__CANCEL__)},it=function(t){return l(t),t.headers=t.headers||{},t.data=nt(t.data,t.headers,t.transformRequest),t.headers=N.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),N.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||tt.adapter)(t).then(function(e){return l(t),e.data=nt(e.data,e.headers,t.transformResponse),e},function(e){return rt(e)||(l(t),e&&e.response&&(e.response.data=nt(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})},ot=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},at=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t};h.prototype.request=function(t){"string"==typeof t&&(t=N.merge({url:arguments[0]},arguments[1])),(t=N.merge(tt,this.defaults,{method:"get"},t)).method=t.method.toLowerCase(),t.baseURL&&!ot(t.url)&&(t.url=at(t.baseURL,t.url));var e=[it,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},N.forEach(["delete","get","head","options"],function(t){h.prototype[t]=function(e,n){return this.request(N.merge(n||{},{method:t,url:e}))}}),N.forEach(["post","put","patch"],function(t){h.prototype[t]=function(e,n,r){return this.request(N.merge(r||{},{method:t,url:e,data:n}))}});var st=h;p.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},p.prototype.__CANCEL__=!0;var ut=p;m.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},m.source=function(){var t;return{token:new m(function(e){t=e}),cancel:t}};var ct=m,ft=v(tt);ft.Axios=st,ft.create=function(t){return v(N.merge(tt,t))},ft.Cancel=ut,ft.CancelToken=ct,ft.isCancel=rt,ft.all=function(t){return Promise.all(t)},ft.spread=function(t){return function(e){return t.apply(null,e)}};var dt=ft,lt=ft;dt.default=lt;var pt=dt,mt=function(t){function e(t){I(this,e);var n=P(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));if(!n.dataSourceUrl||""===n.dataSourceUrl)return P(n);var r=Number(t.a("datasource.interval"));isNaN(r)&&(r=5);var i=t.a("datasource.httpmethod");"post"!==i&&(i="get");var o=t.a("datasource.httpparams");o="string"!=typeof o||""===o?(new Date).getTime():o+"&"+(new Date).getTime();var a=function(){pt({url:n.dataSourceUrl,method:i,params:o,data:o,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){n.handleJsonData(n.dataModel,t.data)})};return a(),r>0&&setInterval(a,1e3*r),n}return _(e,B),e}(),vt=function(t){function e(t){I(this,e);var n=P(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.dataSourceUrl&&""!==n.dataSourceUrl?(n.ws=new SockJS(n.dataSourceUrl),n.client=Stomp.over(n.ws),n.isConnected=!1,n.client.disconnect(function(){n.onDisconnected()}),n.connect(),n):P(n)}return _(e,B),M(e,[{key:"connect",value:function(){var t=this;this.client.connect({},function(){t.isConnected=!0,t.onConnected()},function(){t.isConnected=!1,setTimeout(function(){t.connect()},2e3)})}},{key:"onConnected",value:function(){var t=this,e=this.dataModel.a("datasource.topic");if(e&&""!==e){this.subscription=this.client.subscribe(e,function(e){t.handleJsonData(t.dataModel,JSON.parse(e.body))});var n=this.dataModel.a("datasource.onConnected");n&&""!==n&&new Function("dataModel","datasource",n)(this.dataModel,this)}}},{key:"onDisconnected",value:function(){var t=this;setTimeout(function(){t.connect()},2e3);var e=this.dataModel.a("datasource.onDisconnected");e&&""!==e&&new Function("dataModel","datasource",e)(this.dataModel,this)}}]),e}();ht.DataModel.prototype.initDataSource=function(){var t=this.a("datasource.type");t||(t="HTTP"),this.datasource="HTTP"===t?new mt(this):"WebSocket/Stomp"===t?new vt(this):"WebSocket/SignalR"===t?new j(this):null},ht.DataModel.prototype.initFunc=function(t){var e=this.a("func.init");e&&""!==e&&new Function("dataModel","graphView",e)(this,t)};var yt=function(){function t(){I(this,t)}return M(t,[{key:"getQueryString",value:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(e);return null!=n?decodeURI(n[2]):null}},{key:"init",value:function(t){var e=window.ht,n=this.getQueryString("tag"),r=this.getQueryString("fitContent");r="true";r="true"===r;var i=this.graphView=new e.graph.GraphView,o=this.dataModel=i.dm();t?t.appendChild(t):i.addToDOM(),o.enableDataBindings(),o.enableAnimat(),i.setMovableFunc(function(t){return!1}),i.enableEvent(),e.Default.xhrLoad(n,function(t){var a=e.Default.parse(t);if(a.title&&(document.title=a.title),0===n.indexOf("symbols/")){o.setBackground(a.background);var s=new e.Node;s.setImage(a),s.setPosition(i.getWidth()/2,i.getHeight()/2),o.add(s)}else o.deserialize(a),o.a("title")&&(document.title=o.a("title")),o.initFunc(i),o.initDataSource();r&&(i.fitContent(!0,0),window.addEventListener("resize",function(){i.fitContent()},!1))})}}]),t}();window.displayViewer=new yt}();
    </script>
    <script>
        function init() {
            displayViewer.init();
        }

    </script>

</head>

<body onload="init()">
</body>

</html>
